Manages the render queues available in the component. More...
Public Member Functions | |
~RenderQueueManager () | |
RenderQueue * | createOrRetrieve (int index=-1) |
RenderQueue * | createOrRetrieve (const std::string_view &name) |
RenderQueue * | get (unsigned int index) const |
RenderQueue * | get (const std::string_view &name) const |
RenderQueue * | getByIndex (unsigned int indexGlobal) const |
RenderQueue * | getNamedByIndex (unsigned int indexGlobal) const |
void | rename (const std::string_view &oldName, const std::string_view &newName) |
void | erase (const std::string_view &name) |
void | updateRenderingQueue (int minRQ, int maxRQ) |
void | updateRenderingQueue (const std::string_view &name) |
void | updateRenderingQueue (RenderQueue *fromThisOne) |
RenderQueue * | getComputedRenderingQueue () const |
Manages the render queues available in the component.
The manager owns the memory it allocates. External code should not delete it.
nkGraphics::RenderQueueManager::~RenderQueueManager | ( | ) |
Destructor.
RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve | ( | int | index = -1 | ) |
Creates if unavailable, or retrieves if available, a render queue.
index | The numerical index of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve | ( | const std::string_view & | name | ) |
Creates if unavailable, or retrieves if available, a render queue.
name | The name of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::get | ( | unsigned int | index | ) | const |
Retrieves a queue.
index | The numerical index of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::get | ( | const std::string_view & | name | ) | const |
Retrieves a queue.
name | The name of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::getByIndex | ( | unsigned int | indexGlobal | ) | const |
Retrieves a render queue given an index, fetching indexed queues and named queues. Note that as the internal memory is changed, an index can map to different resources over different calls. Mainly used to loop over all queues in one go.
indexGlobal | The index of the queue to retrieve. |
RenderQueue* nkGraphics::RenderQueueManager::getNamedByIndex | ( | unsigned int | indexGlobal | ) | const |
Retrieves a named queue, by index. Note that an index can point to different queues as the memory gets changed. Mainly used to loop over all named render queues in one go.
indexGlobal | The index of the queue to retrieve. |
void nkGraphics::RenderQueueManager::rename | ( | const std::string_view & | oldName, |
const std::string_view & | newName | ||
) |
Renames a queue, changing both its name and the way to access it within the manager.
oldName | The name of the queue to change. |
newName | The name to rename it to. |
void nkGraphics::RenderQueueManager::erase | ( | const std::string_view & | name | ) |
Erases and frees the memory of a render queue.
name | The name of the render queue to erase. |
void nkGraphics::RenderQueueManager::updateRenderingQueue | ( | int | minRQ, |
int | maxRQ | ||
) |
Updates the rendering queue. Used internally in the rendering process.
minRQ | The minimum index of the queue that will serve as base. |
maxRQ | The maximum index of the queue that will serve as base. |
void nkGraphics::RenderQueueManager::updateRenderingQueue | ( | const std::string_view & | name | ) |
Updates the rendering queue. Used internally in the rendering process.
name | The name of the queue to use. |
void nkGraphics::RenderQueueManager::updateRenderingQueue | ( | RenderQueue * | fromThisOne | ) |
Updates the rendering queue. Used internally in the rendering process.
fromThisOne | The queue to use as a basis to update. |
RenderQueue* nkGraphics::RenderQueueManager::getComputedRenderingQueue | ( | ) | const |